Group members:
Project type: Application Project
Research Question:
What is the difference in emission behavior between the passengers cars and road freight vehicles?
Sub questions:
Scope:
Sources of Data Used:
Team Members Contribution:
https://docs.google.com/spreadsheets/d/13XAgn709_jYkHUsW45FdbP5MM8wKJRv-gXowcEMF_7Q/edit#gid=0
import pandas as pd
import numpy as np
import plotly.express as px
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.linear_model import LinearRegression
import statsmodels.api as sm
import warnings
warnings.filterwarnings('ignore')
Below we import, clean and filter the data for use in later stages. In this part, we also provide other defined functions used in the later part of the report to answer the sub questions.
First, we define the loading of vehicle data (load_vk_data) and emission data (load_ems_data) and do some clean up of the datasets.
def load_vk_data(data_path, meta_path):
vk_data = pd.read_csv(data_path, sep=";", index_col="ID")
vk_meta = pd.read_csv(meta_path, sep=";", skiprows=1, index_col="Key")
vehicle_type = vk_data["TypesOfVehicle"].array.copy()
for i in range(len(vehicle_type)):
vehicle_type[i] = vk_meta.loc[vehicle_type[i], "Title"]
vk_data["TypesOfVehicle"] = vehicle_type
vk_data["Periods"] = vk_data["Periods"].apply(lambda s: int(s[0:4]))
vk_data.drop(columns=vk_data.columns.to_list()[3:], inplace=True)
vk_data.rename(columns={"TypesOfVehicle":"Vehicle Type", "Periods":"Year", "TotalKilometresInTheNetherlands_1":"vhkm"}, inplace=True)
vk_data["vhkm"] *= 1000000 # stored in milion km
return vk_data
def load_ems_data(data_path, source_meta_path, emissions_meta_path):
ems_data = pd.read_csv(data_path, sep=";", index_col="ID")
ems_source_meta = pd.read_csv(source_meta_path, sep=";", skiprows=1, index_col="Key")
ems_emission_meta = pd.read_csv(emissions_meta_path, sep=";", skiprows=1, index_col="Key")
sources = ems_data["Sources"].array.copy()
emissions = ems_data["Emissions"].array.copy()
for i in range(len(sources)):
sources[i] = ems_source_meta.loc[sources[i], "Title"]
emissions[i] = ems_emission_meta.loc[emissions[i], "Title"]
ems_data["Sources"] = sources
ems_data["Emissions"] = emissions
ems_data["Periods"] = ems_data["Periods"].apply(lambda s: int(s[0:4]))
ems_data.rename(columns={"Emissions":"Emission Type", "Periods":"Year", "EmissionsDutchTerritory_1":"Emission"}, inplace=True)
ems_data["Emission"] *= 1000000 # stored in milion kg
return ems_data
# print(vk_data["Vehicle Type"].unique())
# print(ems_data["Sources"].unique())
# print(ems_data["Emission Type"].unique())
In the function below, we define the function to call the category based on the intended column name.
def getCategory(df, col_name, cat, sum_cat):
df = df.copy()
bools = np.zeros(len(df[col_name]), dtype=bool)
for i in range(len(cat)):
bools = np.logical_or(bools, df[col_name] == cat[i])
if sum_cat:
df = df[bools].groupby("Year").sum()
df["Year"] = df.index.array
df.index.names = ["Not_Year"]
return df
else:
return df[bools]
Next, we define the function to create heatmaps based on the type of vehicle, type of emission and the period.
def corr_heatmap(vehicle, emission, start_year=1990, end_year=2021):
vehicle_data_CO2 = vehicle_data[vehicle_data["Emission Type"] == "Carbon dioxide (CO2)"]
vehicle_data_CO = vehicle_data[vehicle_data["Emission Type"] == "Carbon monoxide (CO)"]
vehicle_data_NOx = vehicle_data[vehicle_data["Emission Type"] == "Nitrogen oxides (NOx)"]
vehicle_data_PM10 = vehicle_data[vehicle_data["Emission Type"] == "PM10 (Particulate matter)"]
vehicle_data_CO2 = vehicle_data_CO2[vehicle_data_CO2["Year"] >= start_year]
vehicle_data_CO2 = vehicle_data_CO2[vehicle_data_CO2["Year"] <= end_year]
vehicle_data_CO = vehicle_data_CO[vehicle_data_CO["Year"] >= start_year]
vehicle_data_CO = vehicle_data_CO[vehicle_data_CO["Year"] <= end_year]
vehicle_data_NOx = vehicle_data_NOx[vehicle_data_NOx["Year"] >= start_year]
vehicle_data_NOx = vehicle_data_NOx[vehicle_data_NOx["Year"] <= end_year]
vehicle_data_PM10 = vehicle_data_PM10[vehicle_data_PM10["Year"] >= start_year]
vehicle_data_PM10 = vehicle_data_PM10[vehicle_data_PM10["Year"] <= end_year]
car_data_CO2 = vehicle_data_CO2[vehicle_data_CO2["Sources"] == "Road traffic, passenger cars"]
car_data_CO = vehicle_data_CO[vehicle_data_CO["Sources"] == "Road traffic, passenger cars"]
car_data_NOx = vehicle_data_NOx[vehicle_data_NOx["Sources"] == "Road traffic, passenger cars"]
car_data_PM10 = vehicle_data_PM10[vehicle_data_PM10["Sources"] == "Road traffic, passenger cars"]
freight_data_CO2 = vehicle_data_CO2[vehicle_data_CO2["Sources"] == "Road traffic, freight vehicles"]
freight_data_CO = vehicle_data_CO[vehicle_data_CO["Sources"] == "Road traffic, freight vehicles"]
freight_data_NOx = vehicle_data_NOx[vehicle_data_NOx["Sources"] == "Road traffic, freight vehicles"]
freight_data_PM10 = vehicle_data_PM10[vehicle_data_PM10["Sources"] == "Road traffic, freight vehicles"]
sns.heatmap(eval(f"{vehicle}_data_{emission}").corr(method="pearson"), annot=True)
def total_corr_heatmap():
vehicle_data_CO2 = vehicle_data[vehicle_data["Emission Type"] == "Carbon dioxide (CO2)"]
vehicle_data_CO = vehicle_data[vehicle_data["Emission Type"] == "Carbon monoxide (CO)"]
vehicle_data_NOx = vehicle_data[vehicle_data["Emission Type"] == "Nitrogen oxides (NOx)"]
vehicle_data_PM10 = vehicle_data[vehicle_data["Emission Type"] == "PM10 (Particulate matter)"]
car_data_CO2 = vehicle_data_CO2[vehicle_data_CO2["Sources"] == "Road traffic, passenger cars"]
car_data_CO = vehicle_data_CO[vehicle_data_CO["Sources"] == "Road traffic, passenger cars"]
car_data_NOx = vehicle_data_NOx[vehicle_data_NOx["Sources"] == "Road traffic, passenger cars"]
car_data_PM10 = vehicle_data_PM10[vehicle_data_PM10["Sources"] == "Road traffic, passenger cars"]
freight_data_CO2 = vehicle_data_CO2[vehicle_data_CO2["Sources"] == "Road traffic, freight vehicles"]
freight_data_CO = vehicle_data_CO[vehicle_data_CO["Sources"] == "Road traffic, freight vehicles"]
freight_data_NOx = vehicle_data_NOx[vehicle_data_NOx["Sources"] == "Road traffic, freight vehicles"]
freight_data_PM10 = vehicle_data_PM10[vehicle_data_PM10["Sources"] == "Road traffic, freight vehicles"]
freight_arr = np.array([freight_data_PM10["Year"].array, freight_data_PM10["vhkm"].array, freight_data_CO2["Emission"].array, freight_data_CO["Emission"].array, freight_data_NOx["Emission"].array, freight_data_PM10["Emission"].array])
freight_arr = np.transpose(freight_arr)
freight_index = freight_data_PM10.index.array
freight_df = pd.DataFrame(data=freight_arr, index=freight_index, columns=["Year", "vhkm", "CO2", "CO", "NOx", "PM10"])
car_arr = np.array([car_data_PM10["Year"].array, car_data_PM10["vhkm"].array, car_data_CO2["Emission"].array, car_data_CO["Emission"].array, car_data_NOx["Emission"].array, car_data_PM10["Emission"].array])
car_arr = np.transpose(car_arr)
car_index = car_data_PM10.index.array
car_df = pd.DataFrame(data=car_arr, index=car_index, columns=["Year", "vhkm", "CO2", "CO", "NOx", "PM10"])
plt.figure(figsize=(12,5))
plt.subplot(1,2,1)
sns.heatmap(freight_df.corr(), annot=True)
plt.title("Freight vehicle correlations")
plt.subplot(1,2,2)
sns.heatmap(car_df.corr(), annot=True)
plt.title("Passenger car correlations")
The function below is used to build a regression model with emissions as the dependent variable and either vehicle kilometers or the Year as the independent variable (X_name). This returns the regression summary results as well as a plot of actual and predicted values.
def regression_model(source, emission, X_name, start_year=1990, end_year=2021, ax=None, y_lim=None):
#converting short-name to long-name as in the vehicle_data dataframe
if source == "freight":
source = "Road traffic, freight vehicles"
elif source == "cars":
source = "Road traffic, passenger cars"
if emission == "CO2":
emission = "Carbon dioxide (CO2)"
elif emission == "CO":
emission = "Carbon monoxide (CO)"
elif emission == "NOx":
emission = "Nitrogen oxides (NOx)"
elif emission == "PM10":
emission = "PM10 (Particulate matter)"
#filtering data by parameters
model_data = vehicle_data[vehicle_data["Emission Type"] == emission]
model_data = model_data[model_data["Sources"] == source]
model_data = model_data[model_data["Year"] >= start_year]
model_data = model_data[model_data["Year"] <= end_year]
#setting explanatory and independent variables
Y = model_data['Emission']
X = model_data[X_name]
X = sm.add_constant(X)
#regression model
model = sm.OLS(Y, X, missing='drop')
model_result = model.fit()
#plotting predicted and actual values (fit plot)
if ax == None:
ax = plt.subplot()
fig = sm.graphics.plot_fit(model_result, 1, ax=ax, vlines=False)
ax.set_ylabel(f"{emission} emissions")
ax.set_title(f"{source} {start_year}-{end_year}")
if y_lim != None:
ax.set_ylim(y_lim)
return model_result.summary(), fig
In this step, we do the data importing of Emission per transport mode and Vehicle-kilometres for motor vehicles using the functions we have declared initially. We load the data from the two different datasets and link the data to the metadata files.
vk_data = load_vk_data("data/vehicle-kilometres_data.csv", "data/vehicle-kilometres_typ_meta.csv")
ems_data = load_ems_data("data/emissions_data.csv", "data/emissions_source_meta.csv", "data/emissions_emission_meta.csv")
Next, we choose to filter the data based on two categories which are Freight Vehicles and Passenger Cars. In this data, Freight Vehicles consists of Delivery van, Lorry, and Road Tractor. While the Passenger Cars only consists of Passenger car. Here we also filter the emission data based on the emission that we want to compare in this report, which are CO2, CO, PM10 and NOx. The filtering was done by using the functions we declared above.
vk_data_freight = getCategory(vk_data, "Vehicle Type", ["Delivery van", "Lorry (road tractor not included)", "Road tractor"], True)
vk_data_car = getCategory(vk_data, "Vehicle Type", ["Passenger car"], True)
ems_data = getCategory(ems_data, "Emission Type", ["Carbon dioxide (CO2)", "Carbon monoxide (CO)", "PM10 (Particulate matter)", "Nitrogen oxides (NOx)"], False)
ems_data_freight = getCategory(ems_data, "Sources", ["Road traffic, freight vehicles"], False)
ems_data_car = getCategory(ems_data, "Sources", ["Road traffic, passenger cars"], False)
Following that, we merge vehicle kilometers datasets with emission per vehicle datasets. Then, the emissions per kilometer was also calculated. From here onwards vehicle kilometers will be written as vhkm, and emission per vehicle kilometers will be writen as e/vhkm same for emission per kilometer as e/km.
freight_data = ems_data_freight.merge(right = vk_data_freight, how="left", on="Year")
car_data = ems_data_car.merge(right = vk_data_car, how="left", on="Year")
vehicle_data = pd.concat([freight_data, car_data])
vehicle_data["e/km"] = vehicle_data["Emission"] / vehicle_data["vhkm"]
display(vehicle_data)
| Sources | Emission Type | Year | Emission | vhkm | e/km | |
|---|---|---|---|---|---|---|
| 0 | Road traffic, freight vehicles | Carbon dioxide (CO2) | 1990 | 7.600000e+09 | 1.354200e+10 | 0.561217 |
| 1 | Road traffic, freight vehicles | Carbon dioxide (CO2) | 1991 | 7.900000e+09 | 1.436300e+10 | 0.550024 |
| 2 | Road traffic, freight vehicles | Carbon dioxide (CO2) | 1992 | 8.400000e+09 | 1.565000e+10 | 0.536741 |
| 3 | Road traffic, freight vehicles | Carbon dioxide (CO2) | 1993 | 8.500000e+09 | 1.657200e+10 | 0.512913 |
| 4 | Road traffic, freight vehicles | Carbon dioxide (CO2) | 1994 | 8.500000e+09 | 1.664700e+10 | 0.510603 |
| ... | ... | ... | ... | ... | ... | ... |
| 123 | Road traffic, passenger cars | PM10 (Particulate matter) | 2017 | 2.300000e+06 | 1.089361e+11 | 0.000021 |
| 124 | Road traffic, passenger cars | PM10 (Particulate matter) | 2018 | 2.300000e+06 | 1.103559e+11 | 0.000021 |
| 125 | Road traffic, passenger cars | PM10 (Particulate matter) | 2019 | 2.200000e+06 | 1.103728e+11 | 0.000020 |
| 126 | Road traffic, passenger cars | PM10 (Particulate matter) | 2020 | 1.800000e+06 | 9.265420e+10 | 0.000019 |
| 127 | Road traffic, passenger cars | PM10 (Particulate matter) | 2021 | 1.900000e+06 | NaN | NaN |
256 rows × 6 columns
# Plotting the line graph of Vehicle-kilometres over the years
px.line(vehicle_data, x="Year", y="vhkm", color="Sources")
Two-line graphs are plotted to illustrate the changes of vehicle-kilometers during the 30-year period from 1990 to 2020. These graphs are based on the figures of passenger cars and freight vehicles respectively.
It is observed that the total kilometers traveled by passenger vehicles are approximately 2.5 times more than the kilometers traveled by freights.
As regards passenger vehicles, between 1990 and 1995 fluctuations are observed in total kilometers. Since 1995 the numbers have been increasing dramatically except for 2005 and 2008 (economic crisis start) when a small decline is indicated. From 1990 to 2019, passenger cars kilometers has risen 1.34 times.
On the other hand, from 1990 to 2005 the kilometers traveled by freight vehicles increased significantly. After tax benefits for drivers of private vehicles with "grey registration plates" were eliminated in the middle of 2005, this was associated with a decline in sales of new delivery vans. By 2007 there was an increase again. After 2008, the economic crisis contributed to the reduction of the total mileage of vehicles. Following the lowest level in 2014, the overall mileage of delivery trucks started to rise once more every year. Over the years, freight vehicles kilometers rise 1.89 times.
For 2020 separately, there is a reduction in kilometers traveled by passenger cars and freight vehicles due to extended quarantine because of Covid-19 Pandemic.
# Plotting the line graph of Emission over the years per type of emission and type of vehicle (source)
px.line(vehicle_data, x="Year", y="Emission", color="Emission Type", facet_row="Sources", log_y=True, height=600)
The graphs above depict the trend of emission of freight and passenger vehicles troughout the years of 1990 to 2021. In freight vehicles, all the emission types show a declining trend except Carbon Dioxide that shows a slightly increasing trend. Interestingly, during COVID period, despite a slight decrease in CO2 emissions (-1%) in 2020 vs 2019, the number increased again by +4% in 2021. This phenomenon is presumably because of the freight distribution that was still active during COVID-19 period i.e., increase in online shopping. Another interesting part is in 2015, CO had its lowest number since 1990 and increased again until 2017. However, following that the trend significantly decreased.
The trends in passenger cars' emissions are a bit different than those for freight vehicles. While all the emission types show a declining trend except CO2, the increase in CO2 emissions in passenger cars is more gradual, probably caused by the emerging use of electric cars. However, fuel efficiency and the increase of electric vehicles has not improved substantially enough to offset the increase in transport volume thus, the emissions are still on the rise. Another difference between passenger and freight vehicles is that the effect of the COVID Pandemic on passenger cars emission trends was more noticable than in freight vehicles. This is shown by a decline of 17% in passenger cars' emissions in 2020 compared to 2019 which is likely due to the significant drop in vhkm travelled in 2020. Recall that in freight vehicles, this decline was only 1%. Another difference is that CO emissions in freight vehicles is always lower than CO2 and NOx, however in passenger cars CO emissions are consistently higher than NOx while still below C02.
To further see the behaviour trend of each vehicle type emission, we decided to do some regression analysis. We did for all type of emission and vehicle type, however in this report we will only discuss the interesting findings. Unlike the other emission type, the trend of CO2 throughout the year of 1990 to 2021 in Passenger Cars has a low R-squared of 0.038 while the freight vehicle has an R-squared of 0.718. Hence, we want to show a breakdown graph of CO2 emission in passenger cars.
# Plotting the regression of CO2 Emission in Passenger Cars and Freight Vehicles over the year using the regression function
plt.figure(figsize=(12,5))
summary, fig = regression_model("cars", "CO2", "Year", ax=plt.subplot(1,2,1), y_lim=[0.75e10, 2e10])
summary, fig = regression_model("freight", "CO2", "Year", ax=plt.subplot(1,2,2), y_lim=[0.75e10, 2e10])
Zoom In: CO2 Emission by Passenger Cars in 1990 to 2004 and 2005 to 2015
# Breaking down the CO2 Emission trend in passenger cars. Zooming in two noticable period of change using the regression function
plt.figure(figsize=(12,5))
summary, fig = regression_model("cars", "CO2", "Year", 1990, 2004, ax=plt.subplot(1,2,1), y_lim=[1.5e10, 2e10])
summary, fig = regression_model("cars", "CO2", "Year", 2005, 2015, ax=plt.subplot(1,2,2), y_lim=[1.5e10, 2e10])
The graphs above show the regression model results for passenger cars and freight vehicles' CO2 emissions where the red points indicate the predicted points (regression line) and the blue dots indicate the actual data.
As we can see from the graphs above, there is an increasing trend between 1990 to 2004. In 2005 onwards, the trend started to decrease until 2015. This is indicated by the implementation of some policies regarding transport emission i.e., the Kyoto Protocol that has been established in the Netherlands starting in 2005, and EU Regulation was agreed in 2009. However, in 2015 to 2018 there was a slight increase trend presumably due to an increase in vhkm travelled surpassing the effect of the policies. Finally, there was a significant drop in 2019 to 2021 as the result of low passenger cars movement due to COVID-19 Pandemic.
Although there is a small R-squared value for the period of 1990 to 2021, when we break the period down we can observe that there is a high correlation (R square = 0.955) between CO2 Emission and the year in Passenger Cars during 1990-2004. This phenomenon is possibly due to there was not yet strong commitment to reduce Green House Gasses, particularly CO2, being adopted in the Netherlands. The trend of CO2 Emission and the year in Passenger Cars during 2005 to 2015 also showed a strong correlation (R-squared = 0.975) with a declining trend. It is showing the effectiveness of the Kyoto Protocol implementation in the Netherlands. The significant drop in 2020 also impact the R-squared value of total period being low.
All in all, the CO2 emission is the most volatile emission impacted by the externalities (e.g., policies, pandemic, etc) among all the four emissions being observed in passenger cars over the years.
# Plotting the line graph of emission per kilometres over the years
px.line(vehicle_data, x="Year", y="e/km", color="Emission Type", facet_row="Sources", log_y=True, height=650)
Two line graphs are plotted to show the correlations between emissions per vehicle-kilometer and years. There are 4 types of emission considered, namely CO2, CO, NOx and PM10. These graphs are based on the figures of freight vehicles and passenger cars.
In terms of CO2, the field of freight vehicles experienced a considerable decrease in the amount of CO2 released per kilometer from 1990 to 2005, after that, relatively stable amounts were recorded until 2020. This contrasts with the trend of passenger cars during the same period. Within the first 15 years, the emission of CO2 per passenger car kilometer remained nearly unchanged before it had a significant drop from 2005 to 2020. This fall may be a positive effect of the Kyoto Protocol, an international treaty adopted in Kyoto, Japan in 1997 with the aim to reduce the emissions of six greenhouse gases with CO2 as the most important one. Under the Kyoto Protocol, the European Union Emission Trading System started in 2005 and effectively led to a decrease in CO2 emission per kilometer in the Netherlands. Besides, Dutch effort in promoting electric transport since 2010 also contributed to this decrease.
With regard to the remaining three types of emission which are CO, NOx, PM10, a gradual slight decrease in the amount of emission of each type per kilometer was recorded for both freight vehicles and passenger cars. Remarkably, while the emisison of NOx is higher than that of CO for freight vehicles, the data of CO surpassed the data of NOx for passenger cars over 30 years.
In order to get a more vivid illustration of the changes of emission per vehicle-kilometer during the 1990-2020 period, animations are provided. Because the 4 types of emission have different ranges, we create separate animations for CO2, CO together with NOx, and PM10.
# Creating bar animation with filter function
vehicle_data_ani1 = getCategory(vehicle_data, "Emission Type", ["Carbon dioxide (CO2)"], False)
fig = px.bar(vehicle_data_ani1, x="e/km", y="Sources", orientation='h', animation_frame="Year", animation_group="Sources",
color="Sources", range_x=[0,0.6], title="CO2 emissions per vehicle-kilometer over the years")
fig.update_traces(showlegend=False)
In general, the emission/kilometer of CO2 recorded a downward trend for both freight vehicles and passenger cars. The interesting point here is that from 1990 to 2005, only the emission of CO2 per freight vehicle kilometer changed while the data for passenger cars remained stable. From 2005 to 2020, the former fluctuated around the figure of above 0.4, whereas the latter decreased gradually.
# Creating bar animation with filter function
vehicle_data_ani2 = getCategory(vehicle_data, "Emission Type", ["Carbon monoxide (CO)", "Nitrogen oxides (NOx)"], False)
fig = px.bar(vehicle_data_ani2, x="e/km", y="Emission Type", orientation='h', animation_frame="Year", animation_group="Emission Type",
color="Emission Type", facet_row="Sources", range_x=[0,0.01], height=700, title="CO and NOx emissions per vehicle-kilometer over the years")
fig.update_traces(showlegend=False)
In general, the emission/kilometer of CO and NOx recorded a significant downward trend for both freight vehicles and passenger cars. What should be noticed here about CO is that this emission per freight vehicle kilometer reached a plateau from 2005 to 2010 while the data for passenger cars stopped decreasing during 2002 and 2005. When it comes to NOx, the period from 2006 to 2008 saw a slight increase of the mission of NOx per freight vehicle kilometer, whereas this emission of passenger cars continued to decrease over the whole surveyed period.
# Creating bar animation with filter function
vehicle_data_ani3 = getCategory(vehicle_data, "Emission Type", ["PM10 (Particulate matter)"], False)
fig = px.bar(vehicle_data_ani3, x="e/km", y="Sources", orientation='h', animation_frame="Year", animation_group="Sources",
color="Sources", range_x=[0,0.001], title="PM10 emissions per vehicle-kilometer over the years")
fig.update_traces(showlegend=False)
In general, the emission/kilometer of PM10 recorded a significant downward trend for both freight vehicles and passenger cars. However, the data for freight vehicles was always higher than that for passenger cars during 30 years.
# Plotting the regression of CO2 Emission in Passenger Cars and Freight Vehicles VS vhkm using the regression function
plt.figure(figsize=(12,5), constrained_layout=True)
summary, fig = regression_model("cars", "CO2", "vhkm", ax=plt.subplot(1,2,1), y_lim=[0.7e10, 2e10])
summary, fig = regression_model("freight", "CO2", "vhkm", ax=plt.subplot(1,2,2), y_lim=[0.7e10, 2e10])
The graphs above show the regression model results for passenger cars and freight vehicles' CO2 emissions where the red points indicate the predicted points (regression line) and the blue dots indicate the actual data.
For the passenger cars, the regression model's validity is low (R-quared = 0.445). Taking a closer look, the actual data shows a similar distribution as that observed earlier between emissions vs years, that is, an increase in emissions, followed by a sudden drop in emissions and then back to a gradual increase in emissions. A quick check shows that these two variables (vhkms and Years) are collinear with a correlation of 0.91 as seen in the table below. As such, a large part of the emission behaviour may be explained from either one of them. The interesting part here is that during the time period when CO2 emissions were decreasing (2005-2015), vhkms were increasing meaning that the effect of cleaner vehicles was significant. This is also supported by a declining emission/vehicle kilometer witnessed in the previous sub-question.
For freight vehicles, there is a strong relationship in CO2 emissions and vehicle kilometers(R-quared = 0.962). Unlike for passenger cars, this relationship holds for the entire period 1990-2021 implying that in this sector the influence on CO2 emissions has mainly been based on efforts related to travel (vhkms).
Generally, as may be seen from the graphs above, the CO2 emissions from passenger cars are much higher (about 2 times) than freight vehicles indicating that more efforts need to be geared towards passenger cars' emissions.
#check for collinearity between vhkm and Year
CO2_car = car_data.query('`Emission Type` == "Carbon dioxide (CO2)"')
Y = CO2_car['Emission']
X = CO2_car[['vhkm',
'Year']]
round(CO2_car.corr(),2)
| Year | Emission | vhkm | |
|---|---|---|---|
| Year | 1.00 | 0.19 | 0.91 |
| Emission | 0.19 | 1.00 | 0.67 |
| vhkm | 0.91 | 0.67 | 1.00 |
# Plotting the regression of CO Emission in Passenger Cars and Freight Vehicles VS vhkm using the regression function
plt.figure(figsize=(12,5), constrained_layout=True)
summary, fig = regression_model("cars", "CO", "vhkm", ax=plt.subplot(1,2,1), y_lim=[1e4, 6e8] )
summary, fig = regression_model("freight", "CO", "vhkm", ax=plt.subplot(1,2,2), y_lim=[1e4, 6e8])
For CO emissions, the relationship between the emissions and vhkms is inversely proportional as seen on the graphs above. Since vhkms have been increasing over the years as noted earlier, this also shows that the CO emissions have been declining with time possible over better, more stringent air quality standards. Indeed, the EU vehicle emission standards have gradually tightened the maximum permitted emissions which covers four pollutants: carbon monoxide, hydrocarbons, nitrogen oxides, and particulate matter (diesel vehicles only at present). 1.
It should be noted, however, that for passenger cars' CO emissions, there is a relatively weak relationship to vhkms (R-squared = 0.648) while the relationship for freight vehicles is significantly strong (R-squared = 0.928).
# Plotting the regression of NOx Emission in Passenger Cars and Freight Vehicles VS vhkm using the regression function
plt.figure(figsize=(12,5), constrained_layout=True)
summary, fig = regression_model("cars", "NOx", "vhkm", ax=plt.subplot(1,2,1), y_lim=[0.3e7, 1.5e8])
summary, fig = regression_model("freight", "NOx", "vhkm", ax=plt.subplot(1,2,2), y_lim=[0.3e7, 1.5e8])
Unlike CO emissions, the relationship between NOx emissions and vhkms is relatively strong for passenger cars (R-squared = 0.819) but relatively weak for freight vehicles (R-squared = 0.573). As noted earlier, the declining trend may be attributed to more stringent vehicle emission standards leading to cleaner vehicles.
# Plotting the regression of PM10 Emission in Passenger Cars and Freight Vehicles VS vhkm using the regression function
plt.figure(figsize=(12,5), constrained_layout=True)
summary, fig = regression_model("cars", "PM10", "vhkm", ax=plt.subplot(1,2,1), y_lim=[1e6, 10e6])
summary, fig = regression_model("freight", "PM10", "vhkm", ax=plt.subplot(1,2,2), y_lim=[1e6, 10e6])
For PM10 emissions, both passenger cars and freight vehicles exhibit a relatively strong inverse relationship between emissions and vhkms with R-squared being 0.804 and 0.826 respectively.
With the results gathered about passenger cars and freight vehicles in the subquestions, an answer and conclusion can be formulated for the research question "What is the difference in emission behavior between the passengers cars and road freight vehicules?". To put it simply, cars and freight have roughly the same emission behavior for CO, PM10 and NOx. There are some small indiviual differences which have been mentioned in the previous chapters but they do not dominate the emission behavior.
However this is different for CO2 emissions. There is one big change in CO2 emission behavior between cars and freight. This difference is in the e/vhkm, cars had a constant e/km until 2005 and after that it started getting cleaner, having an approximately 20% decrease in emission in 2020 compared to 2005. For freight this is opposite, freight got cleaner until 2005 and after that it started stagnating.
These conclusions can also be found in the heatmap below which serves as a summary figure. Explanation on how to read the heatmap can be found below the heatmap.
Another difference between freight and cars is the emission and vhkm in 2020. Emissions and vhkm decreased quite a bit in 2020 for cars but it nearly had no impact on freight. That said this was caused by COVID-19 and cannot be considered normal emission behavior.
Lastly, although this falls outside the scope of the research question, it can be seen that the total emissions for the transport sector is not going in the right direction. The total emissions should have been decreasing more significantly over the last 10 years but it stayed constant and even with a slight increase which is quite worrying.
# Plotting the heatmap using the heatmap function
total_corr_heatmap()
The heatmaps show the correlation between the total emission, years and vehicle kilometer for freight vehicles and passenger cars. The heatmaps show that there are not any large differences between freight vehicles' and passenger cars' CO, NOx and PM10 emissions but there is a large difference in the CO2 emissions.
This report uses data per annum for both emission and vehicle-kilometer. This may result in unclear trends during some particular periods of time. We have difficulty in collecting monthly data since monthly data of emission have only been published on a global scale, not specifically in the Netherlands which is the scope of this project. Besides, monthly data of vehicle-kilometer are unavailable. Therefore, we use annual data and choose a long period from 1990 to 2021 to analyse existing trends. Future research can acquire monthly data so as to zoom in the changes of emission behavior to gain valuable insights within a shorter period of time (10-20 years).
When this project is done, the data for the year 2021 have not been completely published. We can only access the data of emissions in 2021, not those of vehicle-kilometer. As a result, the trends of vehicle kilometers over the years, the correlations between emissions per vehicle kilometers and years, and the correlations between emissions and vehicle kilometers can only be evaluated during the period from 1990 to 2020. The latest changes caused by the outbreak of COVID-19 pandemic have not been fully considered. This limitation paves the way for future analysis with sufficient data of 2021.
In this project, we focus on the emission behavior of road freight vehicles and passenger cars due to limited resources. Similar analysis can be applied for other types of vehicle such as public transport, special purpose vehicles, airplanes, etc. Further analysis on these vehicles might bring about the full picture of emission behavior in transportation in the Netherlands, supporting the authorities to design and implement more effective policies.